#pragma once
#ifndef STUDENT_H
#define STUDENT_H

#include <list>
#include <string>
#include <vector>
#include <array>
#include <iomanip>
#include <set>
#include <numeric>
#include <algorithm>
#include <iostream>
#include <sstream> 
#include <string>
#include <vector>
#include <tuple>
#include "course.h"
#include "courseLib.h"

class Student {
private:
    std::array<std::array<std::string, 8>, 11> schedule;  // Class schedule
    std::vector<int> creditSum;  // Course credits
    std::vector<Course> selectedCourses;  // Selected courses
    std::set<int> selectedCourseIds;  // IDs of selected courses for quick duplication check

public:
	// Initialize the class schedule
    void initialSchedule();
    
    // Select a course
    void selectCourse(CourseLib& courseLibrary);
    
    // Drop a course
    void dropCourse(CourseLib& courseLibrary);
    
    // Print the class schedule
    void printSchedule();
    
    // Calculate total credits
    float calculateTotalCredits();
    
	// Check if credits are sufficient
    bool isCreditSufficient(float sumCredit);
    
    // Check if the new course conflicts in schedule
    bool isCourseConflict(const Course& newCourse);
    
    // Add a course to the class schedule
    void addCourseToSchedule(const Course& currentCourse);
    
    // Remove a course from the class schedule
    void removeCourseFromSchedule(const Course& courseToRemove);
    
};

#endif

